using ChessKit.Common.Primitives;

namespace ChessKit.ChessLogics.Internals
{
  internal static class Pos
  {
    public static int Pack(Position position)
    {
      return position.X + position.Y * 8;
    }

    public static Position Unpack(int compactPosition)
    {
      return new Position(compactPosition % 8, compactPosition / 8);
    }
  }
}